/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package functionalEnrichment.semanticSimilarity.semanticSimilarityCalculator.program.geneSetAnalysis;

import java.util.Arrays;

/**
 *
 * @author jamiemacpherson
 */
class Result {

    // gene set identifiers for the two gene sets.
    private String geneSet1Id;
    private String geneSet2Id;

    // the size in number of genes for the two gene sets.
    private int gs1_size;
    private int gs2_size;

    // the size in number of annotated genes for the two gene sets.
    private int gs1_filteredSize;
    private int gs2_filteredSize;

    // the mean semantic similarity between the genes of the two gene sets
    private double meanSimilarity;

    // the standard deviation of the semantic similarity between the two gene sets.
    private double sdSimilarity;

    /**
     * Requires the two gene set identifiers.
     * @param geneSet1Id gene set identifier 1
     * @param geneSet2Id gene set identifier 2
     */
    public Result(String geneSet1Id, String geneSet2Id) {
        this.geneSet1Id = geneSet1Id;
        this.geneSet2Id = geneSet2Id;
    }

    /**
     * @return the number of annotated genes in the first gene set.
     */
    public int getGs1_filteredSize() {
        return gs1_filteredSize;
    }
    /**
     * @return the number of genes (annotated or not) in the first gene set.
     */
    public int getGs1_size() {
        return gs1_size;
    }

    /**
     * @return the number of annotated genes in the second gene set.
     */
    public int getGs2_filteredSize() {
        return gs2_filteredSize;
    }
    /**
     * @return the number of genes (annotated or not) in the second gene set.
     */
    public int getGs2_size() {
        return gs2_size;
    }

    /**
     *
     * @return the standard deviation of the semantic similarity values in an all against all comparison between genes of
     * the two gene sets
     */
    public double getSd() {
        return sdSimilarity;
    }

    /**
     *
     * @param sd the standard deviation of the semantic similarity values in an all against all comparison between genes of
     * the two gene sets
     */
    public void setSd(double sd) {
        this.sdSimilarity = sd;
    }

    /**
     *
     * @return the mean of the semantic similarity values in an all against all comparison between genes of
     * the two gene sets
     */
    public double getMeanSimilarity() {
        return meanSimilarity;
    }

    /**
     *
     * @param meanSim the mean of the semantic similarity values in an all against all comparison between genes of
     * the two gene sets
     */
    public void setMeanSimilarity(double meanSim) {
        this.meanSimilarity = meanSim;
    }

    /**
     * @return the identifier of the first gene set
     */
    public String getGs1() {
        return geneSet1Id;
    }
    /**
     * @return the identifier of the second gene set
     */
    public String getGs2() {
        return geneSet2Id;
    }

    /**
     *
     * @param gs1_filteredSize the number of annotated genes in the first gene set.
     */
    public void setGs1_filteredSize(int gs1_filteredSize) {
        this.gs1_filteredSize = gs1_filteredSize;
    }
    /**
     * @param the number of genes (annotated or not) in the first gene set.
     */
    public void setGs1_size(int gs1_size) {
        this.gs1_size = gs1_size;
    }
    /**
     *
     * @param gs1_filteredSize the number of annotated genes in the second gene set.
     */
    public void setGs2_filteredSize(int gs2_filteredSize) {
        this.gs2_filteredSize = gs2_filteredSize;
    }
    /**
     * @param the number of genes (annotated or not) in the second gene set.
     */
    public void setGs2_size(int gs2_size) {
        this.gs2_size = gs2_size;
    }

    /**
     *
     * @return a summary line including all statistics of the semantic similarity between the two gene sets.
     * This is used to output a line, per gene set comparison, to an output file.
     */
    @Override
    public String toString() {
        return geneSet1Id + "\t" + gs1_size + "\t" + gs1_filteredSize + "\t" + geneSet2Id + "\t" + gs2_size + "\t" + gs2_filteredSize + "\t" + meanSimilarity + "\t" + sdSimilarity;
    }

}
